package Tools.Controller;

import Tools.Model.TimeConvertStore;
import com.opensymphony.xwork2.ActionSupport;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Conley.K on 2016/9/4 0004.
 */
public class TimeConvertAction extends ActionSupport {

    public String execute() throws Exception {

        timeConvertStore = new TimeConvertStore();
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
        timeConvertStore.setConvertTime(df.format(new Date()));
        return SUCCESS;
    }

    public TimeConvertStore getTimeConvertStore() {
        return timeConvertStore;
    }

    public void setTimeConvertStore(TimeConvertStore timeConvertStore) {
        this.timeConvertStore = timeConvertStore;
    }

    private TimeConvertStore timeConvertStore;
    private static final long serialVersionUID = 1L;
}
